<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let a = {
            name:'zhangsan',
            sayName(){
                let that = this;
                console.log(that);
                console.log(this);
                (function fn(){
                    console.log(that.name);
                    console.log(this.name);
                }).call(this);
            }
        };
        let b = {
            name:'lisi'
        };
        a.sayName.call(b);
        console.log("-------------------------------");
        a.sayName();
        console.log("-------------------------------");
        let say = a.sayName;
        say();
    </script>
</body>
</html>